#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QToolBar>
#include <QLabel>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QToolBar* tb = new QToolBar(this);
    addToolBar(Qt::RightToolBarArea,tb);

    tb->setAllowedAreas(Qt::LeftToolBarArea|Qt::RightToolBarArea);

    tb->setFloatable(false);

    tb->setMovable(true);

    QAction* openAction = new QAction("open",this);
    QAction* newAction = new QAction("new",this);

    tb->addAction(openAction);
    tb->addSeparator();
    tb->addAction(newAction);

    QLabel* label = new QLabel("super little monster",this);
    tb->addWidget(label);
}

MainWindow::~MainWindow()
{
    delete ui;
}

